﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Infrastructure;
using WsdShop.Model;
using WsdShop.Model.SearchModels;
using WsdShop.Model.ViewModels;

namespace WsdShop.IService
{
    public interface IUserInfoService
    {
        CacheUserInfo GetUserInfo(int id);

        CacheUserInfo GetUserInfo(string userName);

        bool CheckUserInfo(string userName, string password);

        List<UserInfo> GetUserList(string where);

        CacheUserInfo GetCacheUser();

        void SetCacheUser(int uid);

        List<UserViewModel> GetUserList(UserSearchModel search, out int total);

        Result UpdateUserPassWord(int Id, string NewPassword, int currentUserId,string OldPassword = "");

        Result DelUser(int Id,int currentUserId);

        UserInfo GetUserInfoById(int Id);

        Result UserEditSubmit(UserInfo user,int currentUserId);

        Result ChangeUserState(int Id, int userState, int currentUserId);
    }
}
